#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void init(int arr[],int sz)
{
	int j = 0;
	for (j = 0; j < sz; j++)
	{
		arr[j] = 0;
	}
	for (j = 0; j < sz; j++)
	{
		printf("%d ", arr[j]);
	}
}

void reverse(int arr[], int sz)
{
	int k = 0;
	int t;
	int right = sz - 1;
	for (k = 0; k < (int)sz/2; k++)
	{
		t = arr[k];
		arr[k] = arr[right];
		arr[right] = t;
		right--;
		if (right < k)
		{
			break;
		}
		
	}
	for (k = 0; k < sz; k++)
	{
		printf("%d ", arr[k]);
	}
}

int main()
{
	int arr[] = { 0,1,2,3,4,5,6,7,8,9 };
	int i;
	int sz = sizeof(arr) / sizeof(arr[0]);
	for (i = 0; i < sz; i++)
	{
		printf("%d ", arr[i]);
	}
	printf("\n");
	reverse(arr,sz);
	printf("\n");
	init(arr,sz);
	return 0;
}